package com.linuxgt.common.service.restful;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.HashMap;
import java.util.Map;

/**
 * @author liuteng
 * @date 17-11-17
 */
@Controller
@RequestMapping("/json/*")
public class JsonDemoController {

    @RequestMapping(value = "/list", method = RequestMethod.POST)
    @ResponseBody
    public Map<String, String> doPost() {
        Map<String, String> map = new HashMap<>();
        map.put("name", "liuteng");
        return map;
    }

}
